<script type="text/javascript">
    function onSubmit()
    {
        if($.trim($("#txtUserName").val()) == "")
        {
            alert("请输入登录帐号！");
            $("#txtUserName").focus();
            return false;
        }
        if( $.trim($("#txtPwd").val()) == "")
        {
            alert("请输入登录密码！");
            $("#txtPwd").focus();
            return false;
        }
        $("#pLoginResult").css("display","block");
        $("#pLoginResult").html("正在登录......");
        var random = Math.random();
        $.ajax({url:"<?php echo url_for("other/jQuery");?>",data:"random=" + random +"&submitFlag=login&userName=" + $.trim($("#txtUserName").val()) + "&pwd=" + $.md5($.trim($("#txtPwd").val())) ,success: onSuccessLogin,error:onErrorLogin})
	    $("#btnLogin").attr("disabled",true);
    }
    function onSuccessLogin(oMessage)
    {
        if(oMessage == "ok")
        {
            window.location='<?php echo url_for("system/index");?>';
        }
        else
        {
            $("#pLoginResult").html("您输入的帐号或者密码有误。");
        }
        $("#btnLogin").attr("disabled",false);
    }

    function onErrorLogin(x, e)
    {
        $("#pLoginResult").html(x.responseText);
        $("#btnLogin").attr("disabled",false);
    }
</script>
    <div style="text-align:center;">
        <p>&nbsp;
            </p>
        <p>
            <br />
        </p>
        <table align="center" border="0" cellpadding="0" cellspacing="0" height="378" width="576">
            <tr>
                <td height="100" width="576">
                    <img height="100" src="/images/1.gif" width="575" /></td>
            </tr>
            <tr>
                <td background="/images/2.gif" height="147">

                        <table align="right" border="0" cellpadding="0" cellspacing="0" height="31" style="width: 61%">
                            <tr>
                                <td style="width: 79px; height: 41px;" align="right">
                                    <strong>
                                    用户名:</strong></td>
                                <td style="width: 148px; height: 41px"><input name="txtUserName" type="text" id="txtUserName" />                                    </td>
                                <td width="33%" style="height: 41px">&nbsp;
                                    </td>
                            </tr>
                            <tr>
                                <td style="width: 79px; height: 38px;" align="right">
                                    <strong>
                                    密 &nbsp;码:</strong></td>
                                <td style="width: 148px; height: 38px"><span style="width: 148px; height: 41px">
                                  <input name="txtPwd" type="password" id="txtPwd" />
                                </span>                                   </td>
                                <td style="height: 38px"><input name="btnLogin" type="submit" id="btnLogin" value="登陆" onclick="return onSubmit()" />                              </td>
                            </tr>
                        </table>
                        <p>&nbsp;
                            </p>
                </td>
            </tr>
            <tr>
                <td height="131">
                    <img height="130" src="/images/3.gif" width="575" /></td>
            </tr>
            <tr>
                <td height="30" align="left">
                    <p id="pLoginResult" style="color:red;display:none;"></p></td>
            </tr>
        </table>
    </div>